home *** CD-ROM | disk | FTP | other *** search
/ HAM Radio 1997 / HAM Radio 1997.iso / vcls / inipath / ini.pas next >
Pascal/Delphi Source File  |  1996-04-08  |  1KB  |  52 lines

  1. {Ini-File Component
  2.  
  3.  Designer:  Craig Ward
  4.  Date:      1/9/95
  5.  
  6.  Function:  Sets location to app's Ini-file
  7. *******************************************************************************}
  8. unit Ini;
  9.  
  10. interface
  11.  
  12. uses
  13.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  14.   Forms, Dialogs, IniFiles;
  15.  
  16. type
  17.  TIniFilePath = class(TComponent)
  18.   private
  19.     { Private declarations }
  20.     FPath: string;
  21.     procedure SetIniFilePath(Value: string);
  22.   protected
  23.     { Protected declarations }
  24.   public
  25.     { Public declarations }
  26.   published
  27.     { Published declarations }
  28.     property Path: string read FPath write SetIniFilePath;
  29. end;
  30.  
  31. procedure Register;
  32.  
  33. {****************************************************************************}
  34. implementation
  35.  
  36. {procedure to register this as a custom component}
  37. procedure Register;
  38. begin
  39.   RegisterComponents('Samples', [TIniFilePath]);
  40. end;
  41.  
  42. {set the path}
  43. procedure TIniFilePath.SetIniFilePath(Value: string);
  44. begin
  45.  if value <> FPath then
  46.   begin
  47.    FPath := Value;
  48.   end;
  49. end;
  50.  
  51. end.
  52.